import java.util.function.BiFunction;

class Person {
    String name;
    int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}

public class Task {

    public static void main(String[] args) {
        BiFunction<String, Integer, Person> createPerson = /* TODO */;

        // 等同于
//        BiFunction<String, Integer, Person> createPerson = new BiFunction<String, Integer, Person>() {
//            @Override
//            public Person apply(String s, Integer integer) {
//                return new Person(s, integer);
//            }
//        };

        Person p = createPerson.apply("John", 25);
        System.out.println(p);
        Person p1 = createPerson.apply("Tom", 22);
        System.out.println(p1);
        Person p2 = createPerson.apply("Jerry", 18);
        System.out.println(p2);
    }
    
}